package com.xbongbong.saas.service;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.contractproduct.pojo.dto.QuotationProductDeleteBatchDTO;
import com.xbongbong.pro.contractproduct.pojo.vo.QuotationProductDeleteBatchVO;

import java.util.Map;
import java.util.Set;

/**
 * @author long.rao
 * @version v1.0
 * @date 2019/8/16 10:09
 * @since v1.0
 */
public interface QuotationProductService {

    void dataConsistencyUpdate(String corpid, Long productId, String productName, String specification, String serialNo) throws XbbException;

    /**
     * 批量删除报价产品
     * @author long.rao
     * @date 2019-08-16 20:33
     * @param quotationProductDeleteBatchDTO
     * @return com.xbongbong.pro.contractproduct.pojo.vo.QuotationProductDeleteBatchVO
     * @throws XbbException 业务异常
     */
    QuotationProductDeleteBatchVO deleteBatch(QuotationProductDeleteBatchDTO quotationProductDeleteBatchDTO) throws XbbException;

    /**
     * 由报价单idSet获取报价单产品idSet
     *
     * @param quotationIdSet 报价单idSet
     * @param corpid         公司id
     * @return java.util.Set<java.lang.Long>
     * @author 徐俊杰
     * @date 2019/8/29 19:20
     * @since v1.0
     */
    Set<Long> quotationProductByQuotationId(Set<Long> quotationIdSet, String corpid);

    /**
     * 由报价单id，产品id，公司id获取报价单id-平均价格map
     *
     * @param quotationIdSet 报价单id
     * @param productId 产品id
     * @param corpid 公司id
     * @author 徐俊杰
     * @date 2019/9/2 8:59
     * @since v1.0
     */
    Map<Long, Double> getQuotationIdAvgPriceMap(Set<Long> quotationIdSet, Long productId, String corpid);
}
